.class public Lrexsee/natives/widget/JavaDialog;
.super Lrexsee/core/widget/DivDialog;
.source "JavaDialog.java"


# static fields
.field public static final EVENT_ONJAVADIALOGDISMISSED:Ljava/lang/String; = "onJavaDialogDismissed"


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Lrexsee/natives/ViewTag;)V
    .locals 2
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "style"    # Ljava/lang/String;
    .param p3, "viewTag"    # Lrexsee/natives/ViewTag;

    .prologue
    .line 14
    iget-object v0, p3, Lrexsee/natives/ViewTag;->id:Ljava/lang/String;

    invoke-direct {p0, p1, v0, p2}, Lrexsee/core/widget/DivDialog;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 15
    iget-object v0, p0, Lrexsee/natives/widget/JavaDialog;->div:Lrexsee/core/widget/Div;

    iget-object v1, p3, Lrexsee/natives/ViewTag;->view:Landroid/view/View;

    invoke-virtual {v0, v1}, Lrexsee/core/widget/Div;->addChild(Landroid/view/View;)V

    .line 16
    return-void
.end method


# virtual methods
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    const/4 v1, 0x1

    .line 20
    const/4 v0, 0x4

    if-ne p1, v0, :cond_2

    .line 21
    iget-object v0, p0, Lrexsee/natives/widget/JavaDialog;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->menu:Lrexsee/core/menu/RexseeMenu;

    iget-boolean v0, v0, Lrexsee/core/menu/RexseeMenu;->isOptionsMenuOpen:Z

    if-eqz v0, :cond_0

    .line 22
    iget-object p0, p0, Lrexsee/natives/widget/JavaDialog;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/natives/widget/JavaDialog;
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->closeOptionsMenu()V

    move v0, v1

    .line 36
    :goto_0
    return v0

    .line 25
    .restart local p0    # "this":Lrexsee/natives/widget/JavaDialog;
    :cond_0
    iget-object v0, p0, Lrexsee/natives/widget/JavaDialog;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->window_cancelable:Ljava/lang/String;

    const-string v1, "true"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-virtual {p0}, Lrexsee/natives/widget/JavaDialog;->dismiss()V

    .line 36
    .end local p0    # "this":Lrexsee/natives/widget/JavaDialog;
    :cond_1
    :goto_1
    const/4 v0, 0x0

    goto :goto_0

    .line 27
    .restart local p0    # "this":Lrexsee/natives/widget/JavaDialog;
    :cond_2
    const/16 v0, 0x52

    if-ne p1, v0, :cond_3

    .line 28
    iget-object p0, p0, Lrexsee/natives/widget/JavaDialog;->mContext:Landroid/content/Context;

    .end local p0    # "this":Lrexsee/natives/widget/JavaDialog;
    check-cast p0, Landroid/app/Activity;

    invoke-virtual {p0}, Landroid/app/Activity;->openOptionsMenu()V

    goto :goto_1

    .line 29
    .restart local p0    # "this":Lrexsee/natives/widget/JavaDialog;
    :cond_3
    const/16 v0, 0x54

    if-ne p1, v0, :cond_4

    move v0, v1

    .line 30
    goto :goto_0

    .line 31
    :cond_4
    const/16 v0, 0x50

    if-eq p1, v0, :cond_1

    .line 32
    const/16 v0, 0x18

    if-eq p1, v0, :cond_1

    goto :goto_1
.end method
